package com.usian.user.controller.v1;

import com.usian.apis.user.ApUserLoginControllerApi;
import com.usian.model.article.dtos.ApUserDto;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ApUserLoginController
 * Author:   WGG
 * Date:    2022-11-2022/11/30-14:33
 * Version: 1.0
 * Description:
 */
@RestController
@RequestMapping("/user/api/v1/login")
public class ApUserLoginController implements ApUserLoginControllerApi {
    @Autowired
    private ApUserService apUserService;

    @Override
    @PostMapping("/login_auth")
    public ResponseResult login(@RequestBody ApUserDto dto) {
        return apUserService.login(dto);
    }
}
